﻿using System.Collections.Generic;
using PlaxoSyncWM;

namespace TestPlaxoSyncWM {
    public class ContactFixture {
        private readonly IList<Contact> contacts = new List<Contact>();

        public static ContactFixture InMemory {
            get { return new ContactFixture(); }
        }

        public ContactFixture WithContact(string firstName, string lastName, string mobileNumber) {
            var contact = new Contact(firstName, lastName, mobileNumber);
            contacts.Add(contact);
            return this;
        }

        public void CreateContacts() {
            foreach (Contact contact in contacts)
                contact.Persist();
        }
    }
}